package com.elasticsearch.elasticsearchapi.config;

import org.apache.http.HttpHost;
import org.elasticsearch.client.RestClient;
import org.elasticsearch.client.RestHighLevelClient;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

/**
 * @Classname ElasticSearchConfig
 * @Description TODO
 * @Date 2020-08-27 0:15
 * @Created by gumei
 * @Author: lepua
 */
@Configuration
public class ElasticSearchConfig {

    @Bean
    public RestHighLevelClient restHighLevelClient(){
        RestHighLevelClient restHighLevelClient=new RestHighLevelClient(RestClient.builder(
                new HttpHost("114.67.91.133",9200,"http")));

        return restHighLevelClient;
    }
}
